import fetch from 'utils/fetch';
//import fetch_master from 'utils/fetch_master';
import Cookies from "js-cookie";




export function getUserList(data){
	return fetch({
		url:'/index/index/company_join_users?page='+data.page+'&limit='+data.limit,
		method:'get',
	})
}

export function postDepartmentList(data){
	return fetch({
		url:'/index/company/get_department_list',
		method:'post',
		data:data
	})
}

export function postDepartmentUserList(data){
	return fetch({
		url:'/index/company/get_department_user_list',
		method:'post',
		data:data
	})
}

export function postUserInfo(data){
	return fetch({
		url:'/index/index/info',
		method:'post',
		data:data
	})
}

export function postGetOrderPrice(data){

	return fetch({
		url:'/index/order/get_order_price',
		method:'post',
		data:data
	})
}


export function postGetOrder(data){

	return fetch({
		url:'/index/pay/get_order',
		method:'post',
		data:data
	})
}

export function postCheckOrder(data){

	return fetch({
		url:'/index/order/check_pay',
		method:'post',
		data:data
	})
}


export function postCheckPermanent(){

	return fetch({
		url:'/index/company/check_permanent',
		method:'post',
	})
}


export function getAgentPreAuthCode(){

	return fetch({
		url:'/index/company/get_agent_pre_auth_code',
		method:'get',
	})
}

export function postOrderList(data){

	return fetch({
		url:'/index/order/order_list',
		method:'post',
		data:data
	})
}
export function postOrderActiveDetail(data){

	return fetch({
		url:'/index/order/order_active_detail',
		method:'post',
		data:data
	})
}


export function postAllOrderList(data){

	return fetch({
		url:'/index/order/manager_order_list',
		method:'post',
		data:data
	})
}

export function postSignOrder(data){

	return fetch({
		url:'/index/order/manager_sign_order',
		method:'post',
		data:data
	})
}



//export function getActiveDetail(obj){
//	 var token = localStorage.getItem('token')|| Cookies.get('token');
//	 var url;
//	 if(token){
//	 	url = '/YhCoupon/getActiveCouponDetailHasUser?active_no='+obj.active_no;
//	 }
//	 else{
//	 	url = '/YhCoupon/getActiveCouponDetail?active_no='+obj.active_no;
//	 }
//	 return fetch({
//		url:url,
//		method:'get'
//	})
//
//}
//
//export function postActiveCoupon(data){
//	return fetch({
//		url:'/YhCoupon/addActiveCoupon',
//		method:'post',
//		data:data
//	})
//}
//
//
//export function postSign(data){
//	return fetch_master({
//		url:'/Jsticket/getSignPackage',
//		method:'post',
//		data:data
//	})
//}
//
//export function postAddActiveCoupon(data){
//	return fetch({
//		url:'/YhCoupon/addActiveCoupon',
//		method:'post',
//		data:data
//	})
//}
//
//export function postAddActiveCouponLB(data){
//	return fetch({
//		url:'/YhCoupon/addBoomCoupon',
//		method:'post',
//		data:data
//	})
//}
//
//export function postCouponShow(data){
//	return fetch({
//		url:'/YhCoupon/couponShow',
//		method:'post',
//		data:data
//	})
//}




//export function saveLottery(data){
//	return fetch({
//		url:'/Lists/',
//		method:'post',
//		data:data,
//	})
//}
